package com.yanqu.road.entity.message;

import com.yanqu.road.entity.DataObject;

import java.util.Objects;

public class WorldMessage extends DataObject {
    private int index;
    private int contentType;
    private int type;
    private long sendTime;
    private String content = "";
    private long userId;

    public int getIndex() {
        return index;
    }

    public void setIndex(int index) {
        if(this.index != index) {
            this.index = index;
            setUpdateOption();
        }
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        if(this.type != type) {
            this.type = type;
            setUpdateOption();
        }
    }

    public long getSendTime() {
        return sendTime;
    }

    public void setSendTime(long sendTime) {
        if(this.sendTime != sendTime) {
            this.sendTime = sendTime;
            setUpdateOption();
        }
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        if(!Objects.equals(this.content, content)) {
            this.content = content;
            setUpdateOption();
        }
    }

    public long getUserId() {
        return userId;
    }

    public void setUserId(long userId) {
        if(this.userId != userId) {
            this.userId = userId;
            setUpdateOption();
        }
    }

    public int getContentType() {
        return contentType;
    }

    public void setContentType(int contentType) {
        if (this.contentType != contentType) {
            this.contentType = contentType;
            setUpdateOption();
        }
    }
}
